package com.xjtu.dto.care;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.time.LocalDateTime;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class UpdateCareRecordDto {

    @NotNull
    @Min(value = 1, message = "服务id异常")
    private Integer recordId;

    @NotNull
    @Min(value = 1 ,message = "老人id错误")
    private Integer elderlyId;
    /**
     * 体温
     */
    @NotNull
    private Double bodyTemperature;
    /**
     * 心率（次/分）
     */
    @NotNull
    private Integer pulseRate;
    /**
     * 呼吸频率（次/分）
     */
    @NotNull
    private Integer respiratoryRate;
    /**
     * 高压
     */
    @NotNull
    private Integer systolicPressure;
    /**
     * 低压
     */
    @NotNull
    private Integer diastolicPressure;
    /**
     * 血氧饱和度
     */
    @NotNull
    private Double bloodOxygenSaturation;
    /**
     * 血糖
     */
    @NotNull
    private Double bloodSugar;
    /**
     * 病情观察与处理
     */
    @NotBlank
    private String medicalObservations;
    /**
     * 备注
     */
    private String remarks;
    /**
     * 测量人签名
     */
    @NotBlank
    private String signature;

    @Past
    @JsonFormat(shape = JsonFormat.Shape.STRING , pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime recordTime;
}
